package com.ucode.model.hrm.form;

import com.ucode.tool.validator.InEnum;
import com.ucode.tool.validator.Mobile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Schema(description = "人力资源系统 - 客户公司Form")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class HrmCustomerCompanyForm {

    /**
     * 企业名称
     */
    @Schema(description = "企业名称", example = "华为", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "企业名称不能为空")
    @Size(max = 100, message = "企业名称不能超过 100 个字符")
    private String companyName;
    /**
     * 所属行业
     */
    @Schema(description = "所属行业", example = "互联网", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 50, message = "所属行业不能超过 50 个字符")
    private String industry;
    /**
     * 客户来源
     */
    @Schema(description = "客户来源", example = "互联网", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 50, message = "客户来源不能超过 50 个字符")
    private String source;
    /**
     * 客户级别
     */
    @Schema(description = "客户级别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "客户级别不能为空")
    @Range(min = 1, max = 5, message = "客户级别范围不正确")
    private Integer level;
    /**
     * 联系人
     */
    @Schema(description = "联系人", example = "张飒", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "联系人不能为空")
    @Size(max = 50, message = "联系人不能超过 50 个字符")
    private String contact;
    /**
     * 客户账号
     */
    @Schema(description = "客户账号", example = "zhangsan", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "客户账号不能为空")
    @Size(max = 20, message = "客户账号不能超过 20 个字符")
    private String customerAccount;
    /**
     * 联系手机号
     */
    @Schema(description = "联系手机号", example = "张飒", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "联系手机号不能为空")
    @Mobile
    private String mobile;
    /**
     * 用户性别
     *
     * 枚举类 {@link com.ucode.tool.base.enums.SexEnum}
     */
    @Schema(description = "用户性别", example = "张飒", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "用户性别不能为空")
    @InEnum(value= com.ucode.tool.base.enums.SexEnum.class)
    private Integer sex;
    /**
     * 职位
     */
    @Schema(description = "职位", example = "zhangsan", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 50, message = "职位不能超过 50 个字符")
    private String job;
    /**
     * 省份
     */
    @Schema(description = "所在省份", example = "1", requiredMode = Schema.RequiredMode.AUTO)
    private  Long province;
    /**
     * 城市
     */
    @Schema(description = "所在城市", example = "1", requiredMode = Schema.RequiredMode.AUTO)
    private Long city;
    /**
     * 地区
     */
    @Schema(description = "所在地区", example = "1", requiredMode = Schema.RequiredMode.AUTO)
    private Long area;
    /**
     * 企业地址
     */
    @Schema(description = "企业地址", example = "北京上地", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 255, message = "企业地址不能超过 255 个字符")
    private String address;
    /**
     * 合作状态
     */
    @Schema(description = "合作状态", example = "张飒", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "合作状态不能为空")
    @InEnum( value= com.ucode.model.hrm.enums.HrmCooperationStatusEnum.class)
    private Integer status;
    /**
     * 备注
     */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 500, message = "备注不能超过 500 个字符")
    private String remark;

    /**
     * 费用明细显示字段
     */
    @Schema(description = "费用明细显示字段",requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotEmpty(message = "请选择费用明细显示字段")
    private List<String> costShowColumns;

}
